package oop_05.homework_01;

public class Cat extends Animal {
    public Cat(String name, int health) {
        super(name, health);
    }

    @Override
    public void cry() {
        System.out.println("喵喵喵");
    }

    @Override
    public void eat() {
        System.out.println("吃鱼");
    }
    public void catchMouse(){
        int oldHealth = this.getHealth();
        System.out.println(this.getName()+"正在吃老鼠~~~~");
        this.setHealth(oldHealth+10);
        System.out.println(this.getName() + "当前的健康值是:" + this.getHealth() );
    }
}
